package cloud.kiko.psn.order;

import cloud.kiko.psn.feign.rmi.UserRMI;
import cloud.kiko.psn.feign.config.DefaultFeignConfiguration;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RoundRobinRule;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * 2024/7/14 1:53
 */
@EnableFeignClients(clients = UserRMI.class,defaultConfiguration = DefaultFeignConfiguration.class)
@MapperScan("cloud.kiko.psn.order.mapper")
@SpringBootApplication
@Slf4j
public class BizMicroServiceOrder{
	public static void main(String[] args){
		SpringApplication.run(BizMicroServiceOrder.class, args);
		log.info("🍔==> 业务微服务【订单】已启动");
	}
	
	@Bean // 注册全局负载均衡规则：轮询规则
	public IRule rule() {
		return new RoundRobinRule();
	}
}
